package com.woniu.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;


import com.woniu.entity.vo.UserAppeal5VO;
import com.woniu.entity.vo.UserAppeal6VO;
import com.woniu.entity.vo.UserAppeal7VO;
import com.woniu.mapper.AppealMapper;
import com.woniu.pojo.Appeal;
import com.woniu.service.AppealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author Ma.Lei
* @description 针对表【t_appeal】的数据库操作Service实现
* @createDate 2022-12-16 23:27:25
*/
@Service
public class AppealServiceImpl extends ServiceImpl<AppealMapper, Appeal>
    implements AppealService {

    @Autowired
    private AppealMapper appealMapper;

    @Override
    public UserAppeal5VO selectAppeal5(String orderCode) {
        UserAppeal5VO userAppeal5VO = appealMapper.selectAppeal5(orderCode);
        userAppeal5VO.setStatus("待审核");
        return userAppeal5VO;
    }

    @Override
    public UserAppeal6VO selectAppeal6(String orderCode) {
        UserAppeal6VO userAppeal6VO = appealMapper.selectAppeal6(orderCode);
        userAppeal6VO.setStatus("申诉失败");
        return userAppeal6VO;
    }

    @Override
    public UserAppeal7VO selectAppeal7(String orderCode) {
        UserAppeal7VO userAppeal7VO = appealMapper.selectAppeal7(orderCode);
        userAppeal7VO.setStatus("申诉成功");
        return userAppeal7VO;
    }
    @Override
    public Appeal getAppealByOrderId(String orderId) {
        return appealMapper.getAppealByOrderId(orderId);
    }
}




